<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>media exercise</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	</head>
	<style>
		*{
			margin: 0;
			padding: 0;
		}
	
		.nav{
			width: 80%;
			margin: 0 auto;
			font-size: 0;
		}
		li{
			width: 33%;
			height: 50px;
			display: inline-block;
			font-size: 20px;
			line-height: 50px;
			text-align: center;
			background: skyblue;
		}
		.logo{
			width: 100px;
			height: 100px;
			background: pink;
			float: left;
		}
		
		.btn{
			width: 50px;
			height: 50px;
			display: none;
			float: right;
			line-height: 50px;
			text-align: center;
			font-size: 12px;
		}
		
		@media only screen and (max-width: 768px) {
			.btn{
				display: block;
			}
			
			li{
				width: 100%;
			}
		}
		
		@media only screen and (min-width: 1200px) and {
			.btn{
				display: none;
			}
			
			li{
				width: 33%;
			}
		}
	</style>
	<body>
		<div class="logo">logo</div>
		<div class="btn">按钮</div>
		<ul class="nav">
			<li><a href="">item1</a></li>
			<li><a href="">item2</a></li>
			<li><a href="">item3</a></li>
		</ul>
		
	</body>
</html>
